package com.wc.ttt;

/**
 * @ClassName:CalculatorContext
 * @Author: 鹿建文
 * @Date: 2022/3/23  - 16:04
 * @Describe:
 */
public class CalculatorContext {
    private Calculator calculator;

    public CalculatorContext() {
    }

    public CalculatorContext(Calculator calculator) {
        this.calculator = calculator;
    }

    public void setCalculator(Calculator calculator) {
        this.calculator = calculator;
    }

    public  int cal(Integer num1, Integer num2){
          int res = calculator.cal(num1, num2);
          return  res;

      }
}
